unbound: minimal fix for odhcpd lease file parsing
authorDirk Brenken <dev@brenken.org>
Mon, 8 Dec 2025 17:42:20 +0000 (18:42 +0100)
committerDirk Brenken <dev@brenken.org>
Wed, 10 Dec 2025 17:06:06 +0000 (18:06 +0100)
Current odhcpd in master writes MAC addresses with colons in his lease file,
this new odhcpd format leads to a crash loop in unbound (if DHCPv4 to SLAAC is selected).

Just remove the colons, before the processing in slaac_eui64 begins, fixes #28032

Signed-off-by: Dirk Brenken <dev@brenken.org>
net/unbound/Makefile
net/unbound/files/odhcpd.awk

index 08f87265c15c362c764faaff929d7c3b435588a8..2669dec503d2627245fa2e6afea4d731efb81f52 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=unbound
 PKG_VERSION:=1.24.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://nlnetlabs.nl/downloads/unbound
index 5214500f789b5e74694884ef566591374add8dbb..7b261c50121c4aea22591c3b6ff8f04413af4e85 100644 (file)
@@ -190,6 +190,9 @@ function ipv6_ptr( ipv6, arpa, ary, end, m, n, new6, sz, start ) {
 ##############################################################################
 
 function slaac_eui64( mac,    ary, glbit, eui64 ) {
+  # Remove any colons from mac
+  gsub(":", "", mac) ;
+
   if ( length(mac) >= 12 ) {
     # RFC2373 and use DHCPv4 registered MAC to find SLAAC addresses
     split( mac , ary , "" ) ;